/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.gidoo.owl2.viewer.session;

import java.util.Properties;
import org.apache.wicket.Request;
import org.apache.wicket.protocol.http.WebSession;
import org.gidoo.owl2.backend.DatabaseError;
import org.gidoo.owl2.backend.DerbyDicProvider;
import org.gidoo.owl2.backend.DictionaryProvider;

/**
 *
 * @author thomas
 */
public class OwlSession extends WebSession
{
  
  private DictionaryProvider dicProvider;
  
  public OwlSession(Request request)
  {
    super(request);
    
    dicProvider = new DerbyDicProvider();
    Properties env = new Properties();
    env.put("dbname", "XMLTest");
    try
    {
      dicProvider.init(env);
    }
    catch(DatabaseError ex)
    {
      error("Database error: " + ex.getMessage());
    }
    
  }

  public DictionaryProvider getDicProvider()
  {
    return dicProvider;
  }
  
  
  
}
